<?php

namespace App\Interfaces;


/*
 * 订单接口
 * 
 * @date:2015/12/18
 * @author:Leen
 */
interface OrderService
{






    /**
    * 订单列表
    * 
    * param conditions:要查询的条件数组
    * param page:当前页数
    * param page_size:每页显示多少条数据
    *
    * @date:2016/01/07
    * @author Leen
    */    
    //public function getOrders($user_id,$status,$add_time,$type,$page=1, $page_size=10);

    public function getOrders($user_id);//获取订单
//    public function getOrdersByOrderStatus($user_id,$status);//根据订单状态获取订单
//    public function getOrdersByCommentStatus($user_id,$comment_status);//根据订单评论状态获取订单
    public function countOrders($user_id,$status);//统计订单
    public function getOrderGoods($order_id);//获取订单商品
    public function countOrderGoods($order_id);//统计订单商品总数
    public function getOrdershop($order_id);//获取商铺
    public function getCancelOrders($user_id,$page_size);//获取我取消的订单
    public function countCancelOrders($user_id);//统计我取消的订单

    /**
    * 根据订单id查询订单信息
    * 
    * param order_id:要查询的订单id
    *
    * @date:2016/01/07
    * @author Leen
    */
    public function getByOrderId($order_id);

    /**
    * 根据订单sn查询订单信息
    * 
    * param order_sn:要查询的订单sn
    *
    * @date:2016/01/07
    * @author Leen
    */
    public function getByOrderSn($order_sn, $user_id='');


    /**
     * 取消订单
     * @param $order_id
     * @param $reason
     * @return mixed
     */
    public function cancel($order_id,$reason,$user_id);


    /**
     * 确认收货
     * @param $order_id
     * @return mixed
     */
    public function reciveGoods($order_id);


    public function shipping($order_id,$shipping_type,$shipping_nu,$current_time);

    public function refund($order_id,$refund_num,$refund_fee,$refund_reason,$refund_time);

    //public function getCustomsClearanceStatus($order_sn,$shipping_num,$request_time);

    /**
     * 订单删除
     * @param $order_id
     * @return mixed
     */
    public function destoryOrder($order_id, $user_id);

}//end interface OrderService